<?php 

header("Content-type: image/png");

$dst = imageCreateFrompng('./abc.png'); 


$src = imageCreateFrompng('./logo.png'); 

// $color = imageColorAllocate($src,mt_rand(200,255),mt_rand(200,255),mt_rand(200,255));

$width = imagesx($src);
$hieght = imagesy($src);

// var_dump($width,$hieght);
// imagettftext ( $src, 100,45,500, 500 ,$color , './kingthings Hand.ttf' , 'XUE BING SI');


// imagecopy ( $dst , $src , 100 ,100 , 0 ,0 ,$width , $hieght);

// imagecopymerge ( $dst , $src , 100 ,100 , 0 ,0 ,$width , $hieght,50);

// imagecopyresized ( $dst , $src , 100 ,100 , 0 ,0 ,$width/4 , $hieght/4,$width , $hieght);



//输出
imagepng($dst);
// imagepng($src,'./'.uniqid().'.png');  


//销毁
imageDestroy($src);














 ?>